#pragma once
class CVector3D
{
public:
	CVector3D(void);
	CVector3D(DATA_TYPE x, DATA_TYPE y, DATA_TYPE z);
	virtual ~CVector3D(void);

	DATA_TYPE Dot(const CVector3D& rhs) const;
	CVector3D Cross(const CVector3D& rhs) const;

	CVector3D Normalize() const;
	DATA_TYPE GetLength() const;
	DATA_TYPE GetSquareLength() const;
	CVector3D GetNormalizedAndLength(DATA_TYPE& fLength) const;

	CVector3D operator-() const;

	CVector3D operator+(const CVector3D& rhs) const;
	CVector3D operator-(const CVector3D& rhs) const;
	
	CVector3D operator/(DATA_TYPE fScalar) const;

	DATA_TYPE& operator[](unsigned int idx);
	DATA_TYPE operator[] (unsigned int idx) const;

	DATA_TYPE GetDistance(const CVector3D& rhs) const;

	DATA_TYPE x, y, z;
};

CVector3D operator*(DATA_TYPE fScalar, const CVector3D& vec);

